#include"comm.hpp"
#include"log.hpp"
int main()
{
    Log log;
      //1 打开管道
    // int fd = open(FILENAME, O_APPEND | O_WRONLY);
    int shmid = Getshm();
    //挂接共享内存
    cout<<"shmid:"<<shmid<<endl;
    char* file = (char*)shmat(shmid,NULL,0);
    char put[2] = {"c"};
    while(true)
    {
        cout<<"processb:输入:";
        fgets(file,SIZE,stdin);
       // write(fd,put,1);
       sleep(1);
    }
    //将共享内存与进程脱离
    int ret = shmdt(file);
    return 0;
}